<template>
	<view class="appeal-detail">
		<!-- 顶部背景图区域 -->
		<u-image class="bg-image" width="100%" height="283rpx" src="@/static/image/home/data_statistics/bg.png">
		</u-image>
		<view class="content-wrap">
			<title-tools :title="appealDetail.title" fontSize="30rpx"></title-tools>
			<view class="line"></view>
			<view class="">
				<view style="font-weight: 500;margin: 20rpx 0;">
					诉求内容：
				</view>
				<view class="appeal-content" style="margin-bottom: 20rpx;">
					{{appealDetail.content}}
				</view>
			</view>
			<view class="content">
				<view class="hint" style="font-weight: 500;">
					需要携带以下材料：
				</view>
				<!-- <view class="item" v-for="(item, index) in questionArr" :key="index">
					（{{index + 1}}) {{item}}
				</view> -->
				<view class="item">
					{{appealDetail.appeal_reply}}
				</view>
				<view class="copy-btn">
					<u-button :custom-style="customStyle" @click="handleCopy">复制材料</u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TitleTools from '../../../components/title-tools/TitleTools.vue'
	export default {
		name: 'AppealDetail',
		components: { TitleTools },
		data () {
			return {
				customStyle: {
					marginTop: '50rpx',
					fontSize: '40rpx',
					color: '#fff',
					backgroundColor: '#196EFF',
					borderRadius: '20rpx'
				},
				questionArr: [
					'出具证明并说明运载物品的名称、时间、路线、 超限的尺度(以米为单位)及运载车辆的车号等',
					'出具证明并说明运载物品的名称、时间、路线、 超限的尺度(以米为单位)及运载车辆的车号等',
					'出具证明并说明运载物品的名称、时间、路线、 超限的尺度(以米为单位)及运载车辆的车号等'
				],
				//诉求详情
				appealDetail: {}
			}
		},
		onShow() {
			this.appealDetail = this.$Route.query.detail;
			console.log(this.appealDetail)
		},
		methods: {
			//复制材料
			handleCopy () {
				const that = this;
				console.log(123)
				uni.setClipboardData({
					data: this.appealDetail.appeal_reply,
					success(res) {
						console.log(res)
					}
				})
				// uni.showToast({
				// 	title: '复制成功',
				// 	icon: 'success',
				// 	success() {
				// 		that.$Router.push({
				// 			name: 'backlog_declare_detail',
				// 			params: {
				// 				questionArr: that.questionArr
				// 			}
				// 		})
				// 	}
				// })
			}
		}
	}
</script>

<style lang="scss" scoped>
	.appeal-detail {
		padding: 10rpx 20rpx;
	}
	.bg-image {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		z-index: -1;
	}
	
	.content-wrap {
		padding: 30rpx;
		width: 710rpx;
		min-height: 624rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		.line {
			margin-top: 60rpx;
			margin-bottom: 30rpx;
			width: 670rpx;
			height: 1rpx;
			background: #E5E5E5;
		}
		.content {
			font-size: 28rpx;
			.item {
				margin-top: 10rpx;
			}
		}
	}
</style>
